package com.shop.domain.pink;

import java.util.Date;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.*;
import javax.persistence.Table;
import com.alibaba.fastjson.annotation.JSONField;
import com.shop.jpa.domain.BaseDomain;
import com.shop.jpa.support.JpaConst;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import lombok.Data;

/**
 * <p>AutoPink 实体类</p>
 * <p>Table: t_auto_pink - </p>
 * @author generator
 * @date 2021-02-20 02:07:37
 */
@ApiModel("AutoPink 实体类")
@Data
@Entity
@EntityListeners(AuditingEntityListener.class)
@Table(name = "t_auto_pink")
@SQLDelete(sql = "update t_auto_pink set is_deleted = 1 where id = ?")
@Where(clause = JpaConst.WHERE_CLAUSE_NOT_DELETED)
@DynamicInsert(true)
@DynamicUpdate(true)
public class AutoPink extends BaseDomain implements Serializable {

    @ApiModelProperty(value = "id", hidden = true)
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
	@JSONField(serialize=false)
    private Long id;

    /**
	 * 拼团ID
	 */
    @ApiModelProperty("拼团ID")
	@Column(name = "pink_id")
    private Long pinkId;

    /**
	 * 用户id
	 */
    @ApiModelProperty("用户id")
	@Column(name = "uid")
    private Long uid;

    /**
	 * 产品id
	 */
    @ApiModelProperty("产品id")
	@Column(name = "product_id")
    private Long productId;

    /**
	 * 产品规格id
	 */
    @ApiModelProperty("产品规格id")
	@Column(name = "product_attr_value_id")
    private Long productAttrValueId;

    /**
	 * 订单号
	 */
    @ApiModelProperty("订单号")
	@Column(name = "order_no")
    private String orderNo;

    /**
	 * 状态 0:已中奖 1，中奖续拼待执行  2 已续拼
	 */
    @ApiModelProperty("状态 0:已中奖 1，中奖续拼待执行  2 已续拼")
	@Column(name = "status")
    private Integer status;

    /**
	 * 创建时间
	 */
    @ApiModelProperty("创建时间")
	@Column(name = "create_time")
    private Date createTime;

    /**
	 * 修改时间
	 */
    @ApiModelProperty("修改时间")
	@Column(name = "update_time")
    @JSONField(serialize=false)
    private Date updateTime;

    /**
     * 状态 是否结算等级升级 0 未结算 1已结算
     */
    @ApiModelProperty("是否结算等级升级")
    @Column(name = "is_grade_level")
    private Integer isGradeLevel;


    /**
	 * 是否删除 0 未删除 1已删除
	 */
    @ApiModelProperty("是否删除 0 未删除 1已删除")
	@Column(name = "is_deleted")
    @JSONField(serialize=false)
    private Integer isDeleted;
}